package com.gf.framework.xxljobdemo.schedule;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author gaofei
 * @date 2022/5/23 20:41
 */
@Component
@Slf4j
public class XxlJobSchedule {
    @XxlJob("xxl-job-test1")
    public void test1() {
        String command = XxlJobHelper.getJobParam();
        log.info(String.format("收到xxl-job-test1任务param:%s", command));
        XxlJobHelper.handleSuccess();
    }
}
